(define-module (ton-python)
  #:use-module (guix packages)
  #:use-module (guix download)
  #:use-module (guix build-system python)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (gnu packages)
  #:use-module (gnu packages check)
  #:use-module (gnu packages python-xyz)
  #:use-module (gnu packages python))


(define-public python-proselint
  (package
   (name "python-proselint")
   (version "0.10.2")
   (source
    (origin
     (method url-fetch)
     (uri (pypi-uri "proselint" version))
     (sha256
      (base32
       "017risn0j1bjy9ygzfgphjnyjl4gk7wbrr4qv1vvrlan60wyp1rs"))))
   (build-system python-build-system)
   (arguments
    ;; Disable tests. Rationale: Fails and I (tonton) don't understand
    ;; the errors. Should be reenabled. The native inputs below are for
    ;; testing.
    `(#:tests? #f
      #:phases
      (modify-phases %standard-phases
        (add-after 'unpack 'set-home-directory
          ;; error: [Errno 13] Permission denied: '/homeless-shelter'
          (lambda _ (setenv "HOME" "/tmp") #t)))))
   ;;(native-inputs
   ;;`(("python-pytest" ,python-pytest)
   ;; ("python-nose" ,python-nose)))
   (propagated-inputs
    `(("python-click" ,python-click)
      ("python-future" ,python-future)
      ("python-six" ,python-six)))
   (home-page
    "http://github.com/amperser/proselint")
   (synopsis "Linter for prose")
   (description "A linter for prose.")
   (license license:bsd-3)))
